<#assign treeid=auth.getuuid()>
<script type="text/javascript">
function saveprocess_user(){
	var zTree = $.fn.zTree.getZTreeObj("${treeid}")
    var menus = zTree.getNodes();
	$("#${treeid}").bjuiajax('doAjax', {url:"${rootpath}/Flow/process_user_save",confirmMsg:"是否确定需要保存？",data:{'menus':JSON.stringify(menus[0]),'processid':"${processid!}"}});
}
</script>
<#if auth.getauth(userid,"/Flow/process_user_save")>
<button class="btn btn-green" onclick="saveprocess_user();">保存流程用户</button>
</#if>
<ul id="${treeid}" class="ztree" data-toggle="ztree"
	data-expand-all="true" data-check-enable="true">
	<#list menulist as item>
		<#if item?exists>
		<li data-id="${item.id!}" data-pid="${item.pid!}"
		data-tsid="${item.id!}" data-tspid="${item.pid!}" 
		data-checked="${item.checked}" data-icon="<#if (item.no)!=''>${rootpath}/BJUI/images/user.gif</#if>">${item.name}</li>
		</#if> 
	</#list>
</ul>